const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({ headless: false, slowMo: 250, });
  const page = await browser.newPage();
  await page.goto('https://www.baidu.com');
  // 默认 800px * 600px 单位 px
  await page.setViewport({
    width: 1000,
    height: 800
  })
  await page.screenshot({ path: './public/baidu.png' });
  await browser.close();
})();